<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'lookup-form',
    'enableAjaxValidation'=>false,
)); ?>

<p class="note"><?php echo Yii::t('site','Fields with {marker} are required.',array('{marker}'=>'<span class="required">*</span>')); ?></p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'type'); ?>
        <?php echo $form->textField($model,'type',array('size'=>60,'maxlength'=>128)); ?>
        <?php echo $form->error($model,'type'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'position'); ?>
        <?php echo $form->textField($model,'position',array('size'=>6,'class'=>'centered')); ?>
        <?php echo $form->error($model,'position'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'code'); ?>
        <?php echo $form->textField($model,'code'); ?>
        <?php echo $form->error($model,'code'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'name'); ?>
        <?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>128)); ?>
        <?php echo $form->error($model,'name'); ?>
    </div>

    <div class="row">
        <?php echo CHtml::label(Yii::t('site','Save as new item'),'saveAsNew'); ?>
        <?php echo CHtml::checkBox('saveAsNew'); ?>
    </div>

    <div class="row buttons">
        <?php $this->widget( 'application.extensions.button.DDButton',
                array(
                        'title'=>$model->isNewRecord?Yii::t('site','Create'):Yii::t('site','Save'),
                        'linkTitle'=>$model->isNewRecord?Yii::t('site','Create this record'):Yii::t('site','Save this record'),
                        'formID' => 'lookup-form',
                        'buttonType' => 'save'
        )); ?>
        <?php $this->widget( 'application.extensions.button.DDButton',
                array(
                        'title'=>Yii::t('site','Reset'),
                        'linkTitle'=>Yii::t('site','Reset the form data'),
                        'formID' => 'lookup-form',
                        'buttonType' => 'reset',
                        'confirm' => Yii::t('site','Really reset this form?')
	)); ?>
        <?php $this->widget( 'application.extensions.button.DDButton',
                array(
                        'title'=>Yii::t('site','Cancel'),
                        'linkTitle'=>Yii::t('site','Cancel editing, back to list'),
                        'formID' => 'lookup-form',
                        'buttonType' => 'cancel',
                        'confirm' => Yii::t('site','Really cancel editing this item?'),
                        'url' => array('lookup/admin')
        )); ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->
<script type="text/javascript">
<!--
jQuery('#Lookup_type').focus().select();
// -->
</script>
